﻿using HK.Core.Common;
using HK.Core.Settings.Data;
using HK.Core.Settings.Protocol;
using UnityEngine;

namespace HK.Core.Settings
{
    /// <summary>
    /// 游戏设定
    /// </summary>
    [CreateAssetMenu(fileName = Const.SASSET_FILE_GAME_SETTINGS, menuName = Const.MENU_TXT_GAME_SETTINGS, order = (int)Const.ConstMenuPriority.GameSettings)]
    public class GameSettings : SSettings<GameSettings, GameSettingsData>, IGameSettings<GameSettingsData>
    {
        /// <summary>
        /// 保护构造函数
        /// </summary>
        protected GameSettings() : base(false) { }

        /// <summary>
        /// 加密标志位
        /// </summary>
        public bool Encryption
        {
            get => Body.Encryption;
            set => Body.Encryption = value;
        }

        /// <summary>
        /// 加载缓存池设定
        /// </summary>
        public ILoadPoolSizeSettings LoadPoolSize => Body.LoadPoolSize;
    }
}
